function [fit2,DE] = fitness(data,m,number_qujian)
%UNTITLED2 此处提供此函数的摘要
%   此处提供详细说明
[length,~]=size(data);
DE=zeros(1,length);
for i=1:length
    DE(i)=diversity(data(i,:),m,number_qujian);
end
xi=mean(DE);sum1=zeros(1,length);
for j=1:length
    sum1(j)=(DE(j)-xi)^2;
end
fit2=sum(sum1);
end
% function [fit2,DE] = fitness(data,m,number_qujian)
% %UNTITLED2 此处提供此函数的摘要
% %   此处提供详细说明
% fit1=0;
% [length,~]=size(data);
% DE=zeros(1,length);
% for i=1:length
%     DE(i)=diversity(data(i,:),m,number_qujian);
% end
% xi=mean(DE);
% for j=1:length
%     sum=(DE(j)-xi)^2;
%     fit1=sum+fit1;
% end
% fit2=fit1;
% end